#include <stdio.h>
#include <unistd.h>
int main()
{
  pid_t id = fork();
  if(id<0)
  {
    printf("错误\n");
    return -1;
  }
  if(id ==0)
  {
    while(1)
    {
      printf("我是子进程，pid是%d,暂时无法实现回收 \n",getpid());
      sleep(1);
    }
  }
  else 
  {
    while(1)
    {

      printf("我是父进程，pid是%d,bash能够回收我 \n",getpid());
      sleep(1);
    }
    return 0;

  }
}
